<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/page/public/taglib.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>付款详情</title>
<% request.setAttribute("menu", 1); %>
<%@ include file="/WEB-INF/page/public/contentmeta.jsp"%>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="<%=basePath%>css/global.css" media="all" />
<link rel="stylesheet" href="<%=basePath%>plugins/font-awesome/css/font-awesome.min.css"/>
<link rel="stylesheet" href="<%=basePath%>css/system.css" media="all"/>
<link rel="stylesheet" href="<%=basePath%>css/tab.css" media="all" />
<link rel="stylesheet" href="<%=basePath%>css/YE.css" media="all" />
</head>
<body> 

<!-- 付款记录 -->
<div id="TM-layui-pay" >
	<div class="TM-he-tong admin-entering">
		<form class="layui-form TM-entering-form" action="" id="enterform" novalidate="novalidate">
		<c:if test="${info!=null&&info.id!=null}">
			<%--  <div class="layui-form-item layui-form-area">
                <label class="layui-form-label layui-form-text">总费用：<fmt:formatNumber value="${info.totalamount}" pattern="#,#00"/>元</label>
                <label class="layui-form-label layui-form-text">已付款：<fmt:formatNumber value="${info.totalmoney}" pattern="#,#00"/>元</label>
                <label class="layui-form-label layui-form-textone">未付款：<fmt:formatNumber value="${info.totalamount-info.totalmoney}" pattern="#,#00"/>元</label>
            </div>  --%>
		</c:if>
		
		<!--  <association  property="contractInfo" column="contractid" select="ContractMapper.getContractInfoByIdForMoneyLog"></association>
  		 <association  property="customerInfo" column="cusid" select="CustomerMapper.getCustomerInfoById"></association>
  		 <collection property="approveUsers"    column="id" select="ApproveItemUserMapper.selectApproveUserByFkid"></collection>
		
            -->
          <div class="layui-form-item TM-hetong-zhengshu">
            
	     	<div class="layui-input-block layui-ye-block">
	          <div class="YE-hetong-block" style="float:left;">
	              <ul class="clefix YE-history-text">
	                  <li class='${record.approvalstatus==2?"YE-history-bg":"YE-history-bgone"}'><span></span></li>
	              </ul>
	              <ul class="clefix YE-history-text">
	              	  <li>审批状态:<span>
	              	  	<c:if test="${record.approvalstatus == 0}">审批中</c:if>
		                <c:if test="${record.approvalstatus == 1}">待审批</c:if>
		                <c:if test="${record.approvalstatus == 2}">审批通过</c:if>
		                <c:if test="${record.approvalstatus == 3}">审批驳回</c:if>
	              	  </span></li>
	                  <li>申请人：<span>${record.createuserName}</span></li>
	                  <li>证书用途：<span>${record.usetype==0?"挂资质":"挂项目"}</span></li>
	                  <li>转账类型：<span>${record.transfertype==0?"现金":"转账"}</span></li>
	                  <li>客户名称：<span>${record.customerInfo.cname}</span></li>
	                  <li>户名：<span>${record.name}</span> </li>
	                  <li>账号：<span>${record.cardnumber}</span></li>
	                  <li>合同公司：<span>${cinfo.customerInfo.cname}</span></li>
	                  <li>合同金额：<span>${cinfo.totalamount}元</span></li>
	                 <%--  <li>备注：<span>${record.remark}</span></li> --%>
	              </ul>
	              <ul class="clefix YE-history-textone">
	                  <li>付款金额：<span>${record.totalamount}</span></li>
	                  <li>付款类型：<span>${record.paytype==0?"预付款":"全款"}</span></li>
	                  <li>来源：<span>${record.source==0?"个人":"中介"}</span></li> 
	                  <li>专业：<span>${record.customerInfo.technicalpost}</span></li>
	                  <li>开户银行：<span>${record.bankname}</span> </li>
	                  <li><span></span></li><br>
	                  <li>合同所属人：<span>${cinfo.customerInfo.createusersname}</span></li>
	                  <li>总收款金额：<span>${cinfo.allpaymoney}元</span><c:if test="${cinfo.allpaymoney != null && cinfo.allpaymoney > 0}">
	                			<a class="searchpayinfo" data="${cinfo.id}">(查看合同详情)</a></c:if></li>
	              </ul>
	              <ul class="clefix YE-history-texttwo">
	                  <li>签约年限：<span><dic:cf type="1" name="life_type" value="${info.lifetype}"/></span></li><br>
	                  <li><span></span></li><br>
	                  <li><span></span></li></br>
	                  <li><span></span> </li><br>
	                  <li><span></span> </li><br>
	              </ul>
	               <ul class="clefix YE-history-textone" style="margin-left:100px;width:100%">
	                   <li>备注：<span>${record.remark}</span></li>
	              </ul>
	              <ul class="clefix YE-history-time">
	                  <li>${record.createdate}</li>
	              </ul>
	             
	          </div>
	      </div>
        </div>  
        
        <div class="entering" style="width:74%;margin-left:120px;">
	        <h4>审批记录</h4>
	         <table class="site-table table-hover">
	            <thead>
	             	 <tr>
	                    <th style="width:182px;">审批人</th>
	                    <th style="width:182px;">审批意见</th>
	                    <th style="width:182px;">审批时间</th>
	                    <th style="width:181px;">审批状态</th>
	                </tr>
	              </thead>
	           <tbody class="tb_customercontacts">
	           		<c:forEach items="${record.approveUsers}"  var="au">
	           			<tr >
			                <td>${au.createuserName}</td>
			                <td>${au.opinion}</td>
			                <td><c:if test="${au.state>1}">${au.updatedate}</c:if></td>
			                <td class="<c:if test="${au.state==0||au.state==1}">ye-pay-bgtwo</c:if><c:if test="${au.state==2}">ye-pay-bg</c:if><c:if test="${au.state==3}">ye-pay-bgone</c:if>"></td>
		               	</tr>
	           		
	           		</c:forEach>
	           
					 
	            </tbody>
	          </table>
	          <input type="hidden" name="linetype" id="linetype1" value="1">
	     </div>      	       
    </form>
	</div>
</div>

<script type="text/javascript">

	layui.use(['element','form'], function() {
		 var $ = layui.jquery,
	     layer = layui.layer;
	     var form = layui.form();
	     $(".searchpayinfo").on("click",function(){
	 		var id = $(this).attr("data");
	 		//url = "/customer/moneyrecord?contractid="+id+"&type=1&pid=0";
	 		url = "/customer/contractinfo?id="+id;
	 		parent.layer.open({
                title:"合同详情",
                type:2,
                content:url,
                shadeClose:true,
                btnAlign:'c',
                area:['90%','90%']
            });
	 		
	 		
	 	});
		
	});
		
</script>
 

</body>
</html>